﻿@using SCMS.Resource
@model SCMS.UI.Models.UCurrency
@{AjaxOptions ajaxOpts = new AjaxOptions
      {
          UpdateTargetId = "ContentDiv",
          LoadingElementId = "loading",
          HttpMethod = "Post",
          Url = Url.Action("CreateEdit"),
          OnSuccess = "CloseDialog();if (document.getElementById('table') != null) {initSorter();sorter.size(20);}"
      };
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Ajax.BeginForm(null, null, ajaxOpts, new { @class = "form" }))
{
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.Id)
    <table>
        <tr>
            <td align="right">@Resources.Global_String_Name<font color="red">*</font>:</td>
            <td>
                @Html.EditorFor(model => model.Name)<br />
                @Html.ValidationMessageFor(model => model.Name)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_ShortName<font color="red">*</font>:</td>
            <td>
                @Html.EditorFor(model => model.ShortName)<br />
                @Html.ValidationMessageFor(model => model.ShortName)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_Symbol<font color="red">*</font>:</td>
            <td>
                @Html.EditorFor(model => model.Symbol)<br />
                @Html.ValidationMessageFor(model => model.Symbol)
            </td>
        </tr>
        <tr>
            <td align="right">&nbsp;</td>
            <td>
                <input type="submit" class="btn green" value="@(ViewBag.Action != null ? ViewBag.Action : Resources.Global_String_Save)" />
            </td>
        </tr>
    </table>
}
